﻿using System;
using System.Data.Entity;

namespace TheCup
{
    public class TheCupContext : DbContext
    {
        public TheCupContext()
            : base("DefaultConnection")
        {
            Database.SetInitializer<TheCupContext>(null);
            
            // works for webapi
            Configuration.ProxyCreationEnabled = false;

            // let's include shall we?
            Configuration.LazyLoadingEnabled = false;
        }

        public DbSet<Player> Players { get; set; }
        
        public DbSet<Event> Events { get; set; }
        public DbSet<EventJoin> EventJoins { get; set; }
        
        public DbSet<Course> Courses { get; set; }
        public DbSet<Blog> Blogs { get; set; }

        public DbSet<CommentNew> CommentsNew { get; set; }

        public DbSet<Comment> Comments { get; set; }

        public DbSet<Season> Seasons { get; set; }
        public DbSet<MatchPlayResult> MatchPlayResults { get; set; }

        public DbSet<Round> Rounds { get; set; }
        public DbSet<Scorecard> Scorecards { get; set; }
        public DbSet<Tee> Tees { get; set; }
    }
}